import request from '@/utils/request'

// 优惠卷初始数据接口
export function youhuigetdata(params) {
  return request({
    url: '/admin/coupon/list',
    method: 'get',
    params
  })
}
// 优惠卷删除接口
// /admin/coupon/delete
export function youhuidelete(data) {
  return request({
    url: '/admin/coupon/delete',
    method: 'post',
    data
  })
}
// 优惠卷联级选择器
export function youhuigetlist(params) {
  return request({
    url: '/admin/category/list',
    method: 'get',
    params
  })
}
// 优惠选择器数据
export function youhuigetlist1(params) {
  return request({
    url: '/admin/goods/list',
    method: 'get',
    params
  })
}
// 优惠新增提交
export function youhuiadd(data) {
  return request({
    url: '/admin/coupon/create',
    method: 'post',
    data
  })
}
export function Couponlist(params) {
  return request({
    url: '/admin/coupon/list',
    method: 'get',
    params
  })
}
export function Coupondelete(params) {
  return request({
    url: '/admin/coupon/delete',
    method: 'get',
    params
  })
}
export function Couponcreate(params) {
  return request({
    url: '/admin/coupon/create',
    method: 'post',
    data: params
  })
}
export function Categorylist(params) {
  return request({
    url: '/admin/category/list',
    method: 'get',
    params
  })
}
export function Goodslist(params) {
  return request({
    url: '/admin/goods/list',
    method: 'get',
    params
  })
}
export function Couponupdate(params) {
  return request({
    url: '/admin/coupon/update',
    method: 'get',
    params
  })
}
export function Couponread(params) {
  return request({
    url: '/admin/coupon/read',
    method: 'get',
    params
  })
}
export function Couponlistuser(params) {
  return request({
    url: '/admin/coupon/listuser',
    method: 'get',
    params
  })
}